/*
 * Copyright (c) 2013-2015 Charkey. All rights reserved.
 *
 * This software is the confidential and proprietary information of Charkey.
 * You shall not disclose such Confidential Information and shall use it only
 * in accordance with the terms of the agreements you entered into with Charkey.
 *
 * Charkey MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
 *
 * Charkey SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
 * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
 */

package cn.simastudio.talos.core.mapper.base;

import cn.simastudio.talos.core.model.base.Organization;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrganizationMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(Organization record);

    Organization selectByPrimaryKey(Integer id);

    List<Organization> selectMultiByKey(Integer[] ids);

    int updateByPrimaryKey(Organization organization);

    List<Organization> getAllOrganizations();

    List<Organization> getAllOrganizationsWithExclusion(@Param("id") Integer id, @Param("parentIds") String parentIds);

    List<Organization> getSelfAndChildren(@Param("id") Integer id, @Param("parentIds") String parentIds);
}